package com.itjavas.service.impl;

import com.itjavas.dao.AccountDao;
import com.itjavas.domain.Account;
import com.itjavas.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class AccountServiceImpl implements AccountService {
@Autowired
private AccountDao accountDao;//还没有整合mybatis，暂时无法注入进来
    public List<Account> findAllAccounts() {
        System.out.println("service层");
        return accountDao.findAllAccounts();
    }

    public void addAccount(Account account) {
        accountDao.addAccount(account);

    }

    public Account findAllAccountById(Integer id) {
        return accountDao.findAccountById(id);
    }

    public void upAccount(Account account) {
        accountDao.upAccount(account);
    }

    public void login(Account account) {

    }
}
